package com.lx.nba.handle;

import java.util.Map;

import org.jsoup.Connection.Request;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.support.DaoSupport;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.lx.nba.dao.ManDao;
import com.lx.nba.entiy.Man;
import com.lx.nba.service.ManService;
import com.lx.nba.util.Result;


@Controller
@RequestMapping("get/man")
public class GetManHandle {
	
	@Autowired
	private ManService service ;
	
	@Autowired
	private ManDao dao ;
	
	@RequestMapping(method= RequestMethod.GET)
	public @ResponseBody Map get(){
		
		Result result = new Result() ;
		
		result.addParam("list", service.getFireMan());
		
		return result.getParam() ;
		
	}
	
	@RequestMapping( method= RequestMethod.POST)
	public @ResponseBody Man get(int id ){
		
		return	dao.getManById(id) ;
		
	}

}
